#ifndef RenderWorld_h__
#define RenderWorld_h__

#include "../infLib/infLib.h"

#include "RenderModel.h"

class Material;

typedef struct renderLight_s {
    unsigned int        lightId;

    inf::Vec3           position;
    inf::Mat3           baseAxis;

    inf::Color4         ambient;
    inf::Color4         diffuse;
    inf::Color4         specular;

    float               radius;

    const Material*     lightMaterial;
} renderLight_t;

typedef struct renderEntity_s {
    unsigned int        entityId;

    inf::Vec3           position;
    inf::Mat3           baseAxis;

    inf::Bounds         bounding;

    inf::Mat4           world;

    RenderModel*        model;
} renderEntity_t;

typedef struct renderView_s {
    inf::Vec3           viewOrg;
    inf::Mat3           viewAxis;

    int                 x,y,width,height;
    float               aspect;

    float               fovy;
    float               nearPlane, farPlane;

    inf::Mat4           world;

    const Material*     globalMateria;
} renderView_t;



class RenderWorld {
public:
    virtual ~RenderWorld() {}

    virtual RenderModel*    ImportModelFromFile( const char* fileName ) = 0;
    virtual RenderModel*    GenerateStaticModel( genType_t type ) = 0;

    virtual const char*     GetMapName() const = 0;

    virtual void            AddEntity( renderEntity_t& ent ) = 0;
    virtual void            AddLight( renderLight_t& light ) = 0;

    virtual void            SetRenderView( const renderView_t& view ) = 0;
    virtual renderView_t    GetMainView() const = 0;

    virtual void            UpdateScene() = 0;

    virtual void            RenderScene() = 0;

    virtual renderView_t    GetDefaultView() const = 0;
};

#endif // RenderWorld_h__